<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="./js/jquery.min.js"></script>
<style>
    * {
        padding: 0;
        margin: 0;
    }

    li {
        list-style: none;
    }

    a {
        text-decoration: none;
        color: black;
    }

    .box {
        width: 250px;
        height: 250px;      
        margin: 100px auto;
        overflow: hidden;
        border: 1px solid pink;
    }

    #left {
        float: left;
        border: 1px solid pink;
    }
    #left li{
        width: 48px;
        height: 28px;
        text-align: center;
        line-height: 28px;
        background-image: url(./images/lili.jpg);
    }
    #left li:hover{
        background-image: url(./images/abg\(1\).gif);
    }
    #item {
        float: right;
        width: 200px;
        position: relative;
    }

    #item div {
        position: absolute;
        top: 0;
        left: 0;
        display: none;
    }
</style>

<body>
    <div class="box">
        <ul id="left">
            <li><a href="#">女靴</a></li>
            <li><a href="#">雪地靴</a></li>
            <li><a href="#">冬裙</a></li>
            <li><a href="#">呢大衣</a></li>
            <li><a href="#">毛衣</a></li>
            <li><a href="#">棉服</a></li>
            <li><a href="#">女裤</a></li>
            <li><a href="#">羽绒服</a></li>
            <li><a href="#">牛仔裤</a></li>
        </ul>

        <div id="item">
            <div style="display:block;"><a href="javascript:;"><img src="./images/女靴.jpg" alt=""></a></div>
            <div><a href="javascript:;"><img src="./images/女靴.jpg" alt=""></a></div>
            <div><a href="javascript:;"><img src="./images/冬裙.jpg" alt=""></a></div>
            <div><a href="javascript:;"><img src="./images/呢大衣.jpg" alt=""></a></div>
            <div><a href="javascript:;"><img src="./images/毛衣.jpg" alt=""></a></div>
            <div><a href="javascript:;"><img src="./images/棉服.jpg" alt=""></a></div>
            <div><a href="javascript:;"><img src="./images/女裤.jpg" alt=""></a></div>
            <div><a href="javascript:;"><img src="./images/羽绒服.jpg" alt=""></a></div>
            <div><a href="javascript:;"><img src="./images/牛仔裤.jpg" alt=""></a></div>
        </div>
    </div>

    <script>
        $('#left li').mouseover(function(){
            // $(this).css('background','red');
            // $(this).siblings().css('background','');


            let index=$(this).index();           //获取当前li的索引值
            // $('#item div').eq(index).show();
            // $('#item div').eq(index).siblings().hide();

            $('#item div').eq(index).show().siblings().hide();
        })
    </script>
</body>

</html>